<po-page-default
  [p-actions]="pageActions"
  [p-breadcrumb]="breadcrumb"
  [p-components-size]="componentsSize"
  [p-title]="title"
>
  @if (model) {
    <po-dynamic-form #dynamicForm [p-components-size]="componentsSize" [p-fields]="controlFields" [p-value]="model">
    </po-dynamic-form>
    @if (detailFields.length > 0) {
      <div class="po-sm-12">
        <po-divider [p-label]="detailFields[0].divider"></po-divider>
        <div class="po-row po-mb-2">
          <po-button
            [p-size]="componentsSize"
            [p-label]="literals.detailActionNew"
            (p-click)="detailActionNew()"
          ></po-button>
        </div>
        <po-grid
          #gridDetail
          [p-row-actions]="detailActions"
          [p-columns]="detailFields[0].detail.columns"
          [p-data]="model[detailFields[0].property]"
        >
        </po-grid>
      </div>
    }
  } @else {
    <po-widget [p-size]="componentsSize">
      <po-icon p-icon="ICON_INFO"></po-icon>
      <span class="po-font-text-large">
        {{ literals.registerNotFound }}
      </span>
    </po-widget>
  }
</po-page-default>
